package com.zlf.demo.demo;

/**
 * @ClassName Test
 * @Description TODO
 * @Author 张龙飞
 * @Date 2021/3/10 16:52
 */
public class Test {
    public static void main(String[] args) {
        System.out.println("开始");
        StringBuilder str = new StringBuilder("a");
        System.out.println(test(str));
    }

    public static StringBuilder test(StringBuilder s) {
        try {
            s.append("b");
            int bb = 1 / 0; // 制造运行时异常
            return s.append("c");
        } catch (Exception e) {
            try {
                throw new RuntimeException(" run error");
            } catch (Exception e1) {
                System.out.println("catch!!");
            } finally {
                int b = 1 / 0; // 制造运行时异常
//				System.exit(0);
                System.out.println("!!!");
            }
        } finally {
            System.out.println("===" + s);
            s.append("d");
        }
        return null;
    }
}
